using System;
using System.Windows.Forms;
using Kaleida.ServiceMonitor.Model;

namespace Kaleida.ServiceMonitor.UI
{
    public class ScriptSourceMenuItem : ToolStripMenuItem
    {
        private readonly IScriptSource script;

        public ScriptSourceMenuItem(IScriptSource script, EventHandler onClick)
            : base(script.Name)
        {
            this.script = script;
            
            Click += onClick;
        }

        public IScriptSource Script
        {
            get { return script; }
        }
    }
}